from django.contrib import admin
from .models import Expert, Roadshow, Achievements, Demand

# Register your models here.



class ChoiceRoadshow(admin.StackedInline):
    model = Roadshow
    extra = 0

class ExpertAdmin(admin.ModelAdmin):
    # ...
    list_filter = ['title', 'realm']
    search_fields = ['name']
    inlines = [ChoiceRoadshow]

class AchievementsAdmin(admin.ModelAdmin):
    # ...
    list_filter = ['user', 'realm', 'intellectual_property', 'stage']
    search_fields = ['achievements']


admin.site.register(Expert, ExpertAdmin)
admin.site.register(Roadshow)
admin.site.register(Achievements, AchievementsAdmin)
admin.site.register(Demand)




admin.site.site_header = '百纳后台管理'